<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>StudentHome</title>
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-3.2.1.min.js"></script>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/bootstrap.min.css" />
</head>  
<body>
	   <div>
	   		<nav class="navbar navbar-default" role="navigation">
				<div class="container-fluid" style="background-color: #103983">
					<div class="navbar-header">
						<a class="navbar-brand" href="#">新闻首页</a>
					</div>
					<div class="navbar-header">
						<a class="navbar-brand" href="#"></a>
					</div>
					<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1" style="background-color: #173983;">
						<ul class="nav navbar-nav">
							<li ><a href="${pageContext.request.contextPath }/StudentServlet?method=indexUI">进入前台</a></li>
							<li ><a href="#">管理学生</a></li>
						    <li ><a href="${pageContext.request.contextPath }/AdminServlet?method=showTeacherList">管理老师</a><li >
						</ul>
					</div>
				</div>
			</nav>
	   </div>
       &nbsp;
       &nbsp;
       
	    <h3>
	    	<center>学生信息列表</center>
	    </h3>
		<div class="container">
			<table class="table table-striped">
				<thead>
					<tr >
						<th>学生学号</th>
						<th>学生名字</th>
						<th>学生性别</th>
						<th>邮箱</th>
						<th>管理学生</th>
					</tr>
				</thead>
			 <c:forEach var="item"  items="${students }">
					<tr>							
					        <td>${item.sno }</td>
							<td>${item.sname }</td>
							<td>${item.sex }</td>
							<td>${item.email }</td>
							<td><a href="${pageContext.request.contextPath }/AdminServlet?method=deleteStudent&sno=${item.sno }">删除学生</a></td>
					</tr>
				</c:forEach> 
			</table>
		</div>
</body>
</html>